package com.gxa.community.core.pojo.dto.customer.dto;

import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * @author juran
 * @since 2022-07-19
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName("user_agent_application")
@ApiModel(value = "UserAgentApplication对象", description = "团长申请表")
public class UserAgentApplicationDto implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("申请id")
    @NotEmpty(message = "用户编号不能为空")
    private Integer userId;

    @ApiModelProperty("是否有门店")
    @NotEmpty(message = "门店信息不能为空")
    @Pattern(regexp = "/1|0/g",message = "门店信息有误")
    private Integer islandIs;

    @ApiModelProperty("自提点名称")
    @NotEmpty(message = "自提点名称不能为空")
    private String islandName;

    @ApiModelProperty("号码")
    @NotEmpty(message = "号码不能为空")
    @Pattern(regexp = "^((1\\d\\d)|(14[5|7])|(15([0-3]|[5-9]))|(17[013678])|(18[0,5-9]))\\d{8}$",
    message = "手机号有误")
    private String islandPhone;

    @ApiModelProperty("(团长)备用号码")
    private String islandPhoneBank;

    @ApiModelProperty("自提点地址")
    @NotEmpty(message = "自提点地址不能为空")
    private String islandAddress;

    @ApiModelProperty("精度")
    @NotEmpty(message = "精度不能为空")
    private String precision;

    @ApiModelProperty("维度")
    @NotEmpty(message = "维度不能为空")
    private String dimension;
    @ApiModelProperty("门牌号")
    @NotEmpty(message = "门牌号不能为空")
    private String islandNo;

    @ApiModelProperty("自提点类型/1-便利店/2-快递驿站/3-杂货店/4-水果/5-生鲜店铺/6-其他")
    @NotEmpty(message = "自提点类型不能为空")
    @Size(min = 1,max = 6)
    private Integer islandType;

    @ApiModelProperty("开始营业时间")
    @NotEmpty(message = "开始营业时间不能为空")
    private Long islandStartTime;

    @ApiModelProperty("结束营业时间")
    @NotEmpty(message = "结束营业时间不能为空")
    private Long islandEndTime;

    @ApiModelProperty("营业执照图片")
    @NotEmpty(message = "营业执照图片不能为空")
    private String islandLicense;

    @ApiModelProperty("自提点图片")
    @NotEmpty(message = "自提点图片不能为空")
    private String islandImg;

    @ApiModelProperty("团长身份证正面")
    @NotEmpty(message = "团长身份证正面不能为空")
    private String islandCardFg;

    @ApiModelProperty("团长身份证背面")
    @NotEmpty(message = "团长身份证背面不能为空")
    private String islandCardBg;

    @ApiModelProperty("邀请码")
    private String inviteCode;
}
